package com.skyline.attraction.dao;

import java.util.List;

import com.skyline.attraction.model.AttractionRefrence;
import com.skyline.attraction.type.AttractionRefrenceType;
import com.skyline.base.type.Activity;
import com.skyline.common.bean.Page;
import com.skyline.wo.model.Album;
import com.skyline.wo.model.Article;

public interface AttractionRefrenceDao {

	/**
	 * 插入refrence
	 * 
	 * @param attractionId
	 * @param attractionName
	 * @param attractionPortrait
	 * @param refId
	 * @param refPortrait
	 * @param refTitle
	 * @param refDigest
	 * @param type
	 * @param providerId
	 * @param providerNickname
	 * @param providerPortrait
	 * @param providerEmail
	 * @return
	 */
	public Long insertRefrence(Long attractionId, String attractionName, String attractionPortrait, Long refId,
			String refPortrait, String refTitle, String refDigest, AttractionRefrenceType type, Long providerId,
			String providerNickname, String providerPortrait, String providerEmail);

	/**
	 * 根据ID查找
	 * 
	 * @param id
	 * @param activity
	 * @return AttractionRefrence
	 */
	public AttractionRefrence queryRefrenceById(Long id, Activity activity);

	/**
	 * 根据景点Id获取所属的所有关联资源
	 * 
	 * @param attractionId
	 * @param activity
	 * @param page
	 * @return List
	 */
	public List<AttractionRefrence> queryRefrencesByAttractionId(Long attractionId, Activity activity, Page page);

	/**
	 * 根据景点Id，类型获取所属的所有关联资源
	 * 
	 * @param attractionIdId
	 * @param type
	 * @param activity
	 * @param page
	 * @return
	 */
	public List<AttractionRefrence> queryRefrencesByAttractionIdAndType(Long attractionIdId,
			AttractionRefrenceType type, Activity activity, Page page);

	public void updateRefrenceActivity(Long id, Activity activity);

	public void updateRefPortrait(Long id, String portrait);

	public Integer countTargetRefrenceOfAttraction(Long attractionId, AttractionRefrenceType type, Long refId,
			Activity activity);

	public List<Article> queryArticlesWithRefed(Long ownerId, Long attractionId, Activity activity, Integer authority,
			Page page);

	public List<Album> queryAlbumsWithRefed(Long ownerId, Long attractionId, Activity activity, Integer authority,
			Page page);

	public List<AttractionRefrence> querySomeRefrencesOfAttraction(Long attractionId, Activity normal, Integer size);

	public List<AttractionRefrence> querySomeRefrencesOfAttractionWithType(Long attractionId,
			AttractionRefrenceType type, Activity normal, Integer size);
}
